<template>
	<view class="content">
		<view class="title">
			<text class="title1">{{data.xianxiang}}</text>
			<!-- <view class="btn">
				<button v-show="show_btn" class="btn_i" type="default" @click="btn">处理</button>
			</view> -->
		</view>
		<text class="fu">{{data.laiyuan}}　　{{data.createDate}}</text>
		<text class="detail">{{data.detail}}</text>
		<!-- 处理记录 -->
		<view class="tag2">
			<text class="tag_2">处理记录</text>
		</view>
		<view class="table">
			<zb-table :show-header="true" :columns="column" :stripe="true" :fit="false" :border="true"
				:data="data.maintenanceUser" @rowClick="rowClick"></zb-table>
		</view>
	</view>
</template>

<script>
	export default {
		name: "item_fault_0",
		data() {
			return {
				column: [{
						name: 'createDate',
						label: '处理时间',
						fixed: false,
						width: 200,
						emptyString: '--'
					},
					{
						name: 'people',
						label: '处理人',
						sorter: false,
						width: 150,
					},
				],
			};
		},
		props: {
			//从父控件传过来的值
			data: {
				type: Object,
				default: () => ([])
			},
			show_btn: {
				type: Boolean,
				default: false
			},
			info: {}

		},
		methods: {
			btn() {
				// uni.navigateTo({
				// 	url: '/pages/fault_treatment/fault_treatment_add?data=' + JSON.stringify(this.data) +
				// 		'&info=' + JSON.stringify(this.info)
				// })
			},
			rowClick(row, index) {
				console.log('選中：' + JSON.stringify(row) + "--" + index)
				uni.navigateTo({
					url: '/pages/fault_treatment/fault_treatment_add?id=' + row.id + '&info=' + JSON.stringify(this
						.info) + '&op=3'//data=' + JSON.stringify(this.data)	+'&
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.content {
		@include flex();
		padding: 16rpx;
		flex-direction: column;
		border-bottom-style: solid;
		border-bottom-color: darkgray;
		border-width: 1px;
	}

	.title {
		@include flex();
		justify-content: space-between;
		width: 700rpx;
		padding: 8rpx;

		.title1 {
			font-size: 40rpx;
			text-align: left;
		}

		.btn {
			width: 140rpx;

			.btn_i {
				height: 64rpx;
				background-color: $bg-color;
				border-color: $bg-color;
				border-radius: 8rpx;
				color: white;
				font-size: 24rpx;
			}
		}
	}

	.fu {
		width: 700rpx;
		text-align: left;
		font-size: 32rpx;
		padding: 8rpx;
	}

	.detail {
		width: 700rpx;
		font-size: 32rpx;
		text-align: left;
		padding: 8rpx;
	}

	.tag2 {
		height: 56rpx;
		margin-top: 12rpx;
		width: 700rpx;

		.tag_2 {
			font-size: 36rpx;
			color: $font-color;
		}
	}
</style>